package com.mysnail.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import java.util.HashMap;
import java.util.Map;

@Controller
@RequestMapping("/")
public class MapController {
    @RequestMapping(value = "/cp3")
    public ModelAndView map(){
        ModelAndView mv = new ModelAndView("cp3");
        Map<String,String> map = new HashMap<String,String>();
        map.put("java","hello java!");
        map.put("python","Hello Python!");
        map.put("js","Hello JS");
        mv.addObject("map",map);
        return mv;
    }
}
